hppa-do-not-use-fstack-clash-protection
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Thu, 6 Aug 2026 11:30:12 +0000 (13:30 +0200)
committerAlexandre Detiste <tchet@debian.org>
Thu, 6 Aug 2026 11:30:12 +0000 (13:30 +0200)
===================================================================

Gbp-Pq: Name hppa-do-not-use-fstack-clash-protection.patch

cmake/compilers/GNU.cmake

index 79bae4389acfb51f003831daba85c0c97198984d..5fb8e5a5db9640bc110b055a4df80ed2d2c41bdd 100644 (file)
@@ -84,7 +84,9 @@ endif()
 if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)
     # gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime
     set(TBB_DSE_FLAG $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},6.0>>:-flifetime-dse=1>)
-    set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
+    if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(hppa|parisc)")
+        set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
+    endif()
 
     # Suppress GCC 12.x-15.x warning here that to_wait_node(n)->my_is_in_list might have size 0
     set(TBB_COMMON_LINK_FLAGS ${TBB_COMMON_LINK_FLAGS} $<$<AND:$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>,$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},16.0>>:-Wno-stringop-overflow>)
@@ -111,7 +113,9 @@ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-secur
 if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN)
     set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fcf-protection=full>)
 endif ()
-set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
+if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(hppa|parisc)")
+    set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
+endif()
 
 # -z switch is not supported on MacOS and MinGW
 if (NOT APPLE AND NOT MINGW)